<!doctype html>
<html lang="ru" data-bs-theme="dark">

<head>
    <!-- 2024-05-11 14:14:07 -->
        <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>git rm</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.1.0/css/flag-icons.min.css" integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link href="../../../runebook.css" rel="stylesheet" type="text/css">
    <meta name="x-github" content="https://github.com/runebookdev/runebook">
            <meta name="x-i18n-doc" content="git">
        <script>
        function i18n(element) {
            // NOP
        }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.js" integrity="sha512-F/dia2jKME12jwqiYDayeD+Rr/8jTWUD2wfbuJB0bzSwenSEnXsn4qQ/wVyXUCix5bmCAj8xJdtFr2OqUtjLAw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js" integrity="sha512-D9LDs8YUUVa4V9Gl4Zb+xqRAc7RCzooR3+zzebgK2RMu/KU+dh90pbjEEMzPiSyRSGbSp9j1pZnrO4joGa5WEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg==" crossorigin="anonymous"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6424571640879890" crossorigin="anonymous"></script>    <script async src="https://www.googletagmanager.com/gtag/js?id=G-3G5BZ1QEDP"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-3G5BZ1QEDP');
</script>    <script>
(function(c, l, a, r, i, t, y) {
    c[a] = c[a] || function() {
        (c[a].q = c[a].q || []).push(arguments)
    };
    t = l.createElement(r);
    t.async = 1;
    t.src = "https://www.clarity.ms/tag/" + i + "?ref=bwt";
    y = l.getElementsByTagName(r)[0];
    y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "jto2hd94r9");
</script>    <script src="../../../theme.js"></script>
</head>

<body>
    <header class="bg-black">
        <div class="container">
            <div class="row">
                <div class="col">
                    <nav class="navbar navbar-expand-lg navbar-dark">
                        <a class="navbar-brand fw-bold" href="https://runebook.dev/ru">
                            <img alt="Runebook.dev" class="d-inline-block align-top mr-1" src="../../../assets/runebook_logo.webp" width="24" height="24">
                            Runebook.dev
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/ru#docs">Documentation</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/contributors">Contributors</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://github.com/runebookdev/runebook/issues">GitHub</a>
                                </li>
                            </ul>
                                                                                                <button class="btn btn-success ms-2" id="showPopupButton">
                                        <i class="bi bi-translate"></i>
                                        Show English
                                    </button>
                                                                                        <div class="form-check form-switch ms-3">
                                <label class="text-light">
                                    <input class="form-check-input" type="checkbox" role="switch" id="theme-switch" checked>
                                    <i class="bi bi-moon-stars-fill"></i>
                                </label>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
    </header>

    <!--sse-->
    <div class="container">
    <div class="row">
        <div class="col">
            <nav aria-label="breadcrumb" class="mt-2">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item">
                        <a href="https://runebook.dev/ru#docs">
                            <span class="fi fi-ru"></span>                            Русский                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <a href="-index-.html">
                            Git                            2.43                        </a>
                    </li>
                                            <li class="breadcrumb-item">
                            <a href="-index-.html#Basic_Snapshotting">
                                Basic Snapshotting                            </a>
                        </li>
                                    </ol>
            </nav>
        </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-9">
            <main>
                <article>

                    
                    <h1 class="text-body-emphasis" ><span data-i18n="7e1478eb2d5c6e58ceace6ed5edffb8bdcf19be6d868b60432a8fd8d4175a8de/81" data-source="git-rm" onmousemove="i18n(this)">git-rm</span></h1> <h2 class="text-body-emphasis"  id="_name"><span data-i18n="dcd1d5223f73b3a965c07e3ff5dbee3eedcfedb806686a05b9b3868a2c3d6d50/3a" data-source="Name" onmousemove="i18n(this)">Name</span></h2> <div> <p><span data-i18n="a1522f9c60dc3a1e49400fb25ca2c6dcd3edbfe472415a772aeda09bb996747d/44" data-source="git-rm - Remove files from the working tree and from the index" onmousemove="i18n(this)">git-rm &mdash; &Ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy;&ycy; &icy;&zcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &icy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;</span></p> </div> <h2 class="text-body-emphasis"  id="_synopsis"><span data-i18n="8eb3755381519d7f0479d75446e56e20084834c0460d7ec94926932372ea6c47/0d" data-source="Synopsis" onmousemove="i18n(this)">Synopsis</span></h2> <div> <div> <pre class="hljs language-css">git rm <span class="hljs-selector-attr">[-f | --force]</span> <span class="hljs-selector-attr">[-n]</span> <span class="hljs-selector-attr">[-r]</span> <span class="hljs-selector-attr">[--cached]</span> <span class="hljs-selector-attr">[--ignore-unmatch]</span>
          <span class="hljs-selector-attr">[--quiet]</span> <span class="hljs-selector-attr">[--pathspec-from-file=&lt;file&gt; [--pathspec-file-nul]</span>]
          <span class="hljs-selector-attr">[--]</span> <span class="hljs-selector-attr">[&lt;pathspec&gt;&hellip;&ZeroWidthSpace;]</span></pre> </div> </div> <h2 class="text-body-emphasis"  id="_description"><span data-i18n="526e0087cc3f254d9f86f6c7d8e23d954c4dfda2b312efc29194ae8a860106ba/d3" data-source="Description" onmousemove="i18n(this)">Description</span></h2> <div> <p><span data-i18n="bf44f4634607ec41f7f874377c979d9468cea76ab8e39d9d030ffdf96f234ee1/03" data-source="Remove files matching pathspec from the index, or from the working tree and the index. &lt;code&gt;git rm&lt;/code&gt; will not remove a file from just your working directory. (There is no option to remove a file only from the working tree and yet keep it in the index; use &lt;code&gt;/bin/rm&lt;/code&gt; if you want to do that.) The files being removed have to be identical to the tip of the branch, and no updates to their contents can be staged in the index, though that default behavior can be overridden with the &lt;code&gt;-f&lt;/code&gt; option. When &lt;code&gt;--cached&lt;/code&gt; is given, the staged content has to match either the tip of the branch or the file on disk, allowing the file to be removed from just the index. When sparse-checkouts are in use (see &lt;a href=&quot;git-sparse-checkout&quot;&gt;git-sparse-checkout[1]&lt;/a&gt;), &lt;code&gt;git rm&lt;/code&gt; will only remove paths within the sparse-checkout patterns." onmousemove="i18n(this)">&Ucy;&dcy;&acy;&lcy;&icy;&tcy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;, &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&iecy;&lcy;&yucy; &pcy;&ucy;&tcy;&icy;, &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &icy;&lcy;&icy; &icy;&zcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;.  <code>git rm</code>  &ncy;&iecy; &ucy;&dcy;&acy;&lcy;&icy;&tcy; &fcy;&acy;&jcy;&lcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;. (&Ncy;&iecy;&vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &icy;&zcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &icy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&icy;&tcy;&softcy; &iecy;&gcy;&ocy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy;; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>/bin/rm</code> , &iecy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &ecy;&tcy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy;.) &Ucy;&dcy;&acy;&lcy;&yacy;&iecy;&mcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &dcy;&ocy;&lcy;&zhcy;&ncy;&ycy; &bcy;&ycy;&tcy;&softcy; &icy;&dcy;&iecy;&ncy;&tcy;&icy;&chcy;&ncy;&ycy; &kcy;&ocy;&ncy;&chcy;&icy;&kcy;&ucy; &vcy;&iecy;&tcy;&kcy;&icy;, &icy; &ncy;&icy;&kcy;&acy;&kcy;&icy;&khcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&icy;&jcy;. &kcy; &icy;&khcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&mcy;&ocy;&mcy;&ucy; &mcy;&ocy;&zhcy;&ncy;&ocy; &rcy;&acy;&zcy;&mcy;&iecy;&scy;&tcy;&icy;&tcy;&softcy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy;, &khcy;&ocy;&tcy;&yacy; &ecy;&tcy;&ocy; &pcy;&ocy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &mcy;&ocy;&zhcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&acy;  <code>-f</code> . &IEcy;&scy;&lcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;  <code>--cached</code> , &pcy;&rcy;&ocy;&mcy;&iecy;&zhcy;&ucy;&tcy;&ocy;&chcy;&ncy;&ycy;&jcy; &kcy;&ocy;&ncy;&tcy;&iecy;&ncy;&tcy; &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&tcy;&softcy; &lcy;&icy;&bcy;&ocy; &kcy;&ocy;&ncy;&chcy;&icy;&kcy;&ucy; &vcy;&iecy;&tcy;&kcy;&icy;, &lcy;&icy;&bcy;&ocy; &fcy;&acy;&jcy;&lcy;&ucy; &ncy;&acy; &dcy;&icy;&scy;&kcy;&iecy;, &chcy;&tcy;&ocy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &fcy;&acy;&jcy;&lcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;. &Kcy;&ocy;&gcy;&dcy;&acy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&tcy;&scy;&yacy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ycy;&iecy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&icy; (&scy;&mcy;.  <a href="git-sparse-checkout.html">git-sparse-checkout[1]</a> ),  <code>git rm</code>  &bcy;&ucy;&dcy;&iecy;&tcy; &ucy;&dcy;&acy;&lcy;&yacy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &pcy;&ucy;&tcy;&icy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &shcy;&acy;&bcy;&lcy;&ocy;&ncy;&ocy;&vcy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ycy;&khcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&ocy;&kcy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_options"><span data-i18n="d0db8b5e364b6989e4b8f38a2b3846b87d99a51c1592ebf35d21cc66405a8e39/b6" data-source="Options" onmousemove="i18n(this)">Options</span></h2> <div> <div> <dl> <dt id="Documentation/git-rm.txt-ltpathspecgt82308203"><span data-i18n="5c5493d0791d7f222f3401382dbca513ccb6d257ea0ecc4d926b47bd7c332f5f/89" data-source="&amp;lt;pathspec&amp;gt;&amp;hellip;" onmousemove="i18n(this)">&lt;pathspec&gt;&hellip;</span></dt> <dd> <p><span data-i18n="5abf06fcb8c6415764b416158f1b4d5b05f62cc2a924e072407d8b9de1d17c1c/71" data-source="Files to remove. A leading directory name (e.g. &lt;code&gt;dir&lt;/code&gt; to remove &lt;code&gt;dir/file1&lt;/code&gt; and &lt;code&gt;dir/file2&lt;/code&gt;) can be given to remove all files in the directory, and recursively all sub-directories, but this requires the &lt;code&gt;-r&lt;/code&gt; option to be explicitly given." onmousemove="i18n(this)">&Fcy;&acy;&jcy;&lcy;&ycy; &dcy;&lcy;&yacy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy;. &Dcy;&lcy;&yacy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy; &vcy;&scy;&iecy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy; &icy; &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&vcy;&ncy;&ocy; &vcy;&scy;&iecy;&khcy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&ocy;&vcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &vcy;&iecy;&dcy;&ucy;&shchcy;&iecy;&iecy; &icy;&mcy;&yacy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;,  <code>dir</code>  &dcy;&lcy;&yacy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy;  <code>dir/file1</code>  &icy;  <code>dir/file2</code> ), &ncy;&ocy; &dcy;&lcy;&yacy; &ecy;&tcy;&ocy;&gcy;&ocy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy; &yacy;&vcy;&ncy;&ocy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;  <code>-r</code> .</span></p> <p><span data-i18n="189d606ec943d81736da246b52ba5e25dd31e32e4a789e34faaa4719e74be9f0/2b" data-source="The command removes only the paths that are known to Git." onmousemove="i18n(this)">&Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &tcy;&iecy; &pcy;&ucy;&tcy;&icy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &icy;&zcy;&vcy;&iecy;&scy;&tcy;&ncy;&ycy; Git.</span></p> <p><span data-i18n="488093619a459eb98d5e8458d963309ea4df3c0154b16336b1fd840c3d68cb61/ae" data-source="File globbing matches across directory boundaries. Thus, given two directories &lt;code&gt;d&lt;/code&gt; and &lt;code&gt;d2&lt;/code&gt;, there is a difference between using &lt;code&gt;git rm &amp;apos;d*&amp;apos;&lt;/code&gt; and &lt;code&gt;git rm &amp;apos;d/*&amp;apos;&lt;/code&gt;, as the former will also remove all of directory &lt;code&gt;d2&lt;/code&gt;." onmousemove="i18n(this)">&Pcy;&ocy;&dcy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&kcy;&acy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &gcy;&rcy;&acy;&ncy;&icy;&tscy;&acy;&mcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&ocy;&vcy;. &Tcy;&acy;&kcy;&icy;&mcy; &ocy;&bcy;&rcy;&acy;&zcy;&ocy;&mcy;, &ucy;&chcy;&icy;&tcy;&ycy;&vcy;&acy;&yacy; &dcy;&vcy;&acy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;  <code>d</code>  &icy;  <code>d2</code> , &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &rcy;&acy;&zcy;&ncy;&icy;&tscy;&acy; &mcy;&iecy;&zhcy;&dcy;&ucy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;&mcy;  <code>git rm &apos;d*&apos;</code>  &icy;  <code>git rm &apos;d/*&apos;</code> , &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &pcy;&iecy;&rcy;&vcy;&ycy;&jcy; &tcy;&acy;&kcy;&zhcy;&iecy; &ucy;&dcy;&acy;&lcy;&icy;&tcy; &vcy;&iecy;&scy;&softcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  <code>d2</code> .</span></p> <p><span data-i18n="650607ea17f595aebbbfe78f73f3a97d6140cbf9f4b2d78e76db3388abadf879/ee" data-source="For more details, see the &lt;code&gt;pathspec&lt;/code&gt; entry in &lt;a href=&quot;gitglossary&quot;&gt;gitglossary[7]&lt;/a&gt;." onmousemove="i18n(this)">&Dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&iecy; &scy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&yacy; &scy;&mcy;. &vcy; &zcy;&acy;&pcy;&icy;&scy;&icy;  <code>pathspec</code>  &vcy;  <a href="gitglossary.html">gitglossary[7]</a> .</span></p> </dd> <dt id="Documentation/git-rm.txt--f"><span data-i18n="0e6503c1ece40e4ea7668463248ea2716eb37643f2c2c605f8bcee4d195a1705/83" data-source="-f" onmousemove="i18n(this)">-f</span></dt> <dt id="Documentation/git-rm.txt---force"><span data-i18n="be262a109369ff4174b4b7a7aa917a83ca99dc94093be7d497384bb8c0f9cee6/ef" data-source="--force" onmousemove="i18n(this)">--force</span></dt> <dd> <p><span data-i18n="a418dcd70c4b2cec6c163952b6295dfc19816cd6224e676c5b9810bffbfd974d/10" data-source="Override the up-to-date check." onmousemove="i18n(this)">&Pcy;&iecy;&rcy;&iecy;&ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&icy;&tcy;&softcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&ucy; &acy;&kcy;&tcy;&ucy;&acy;&lcy;&softcy;&ncy;&ocy;&scy;&tcy;&icy;.</span></p> </dd> <dt id="Documentation/git-rm.txt--n"><span data-i18n="5249f4fcc629efa0e6d6b2bf746b6c5de61611ce719ad61ac820fbe5c8cece66/28" data-source="-n" onmousemove="i18n(this)">-n</span></dt> <dt id="Documentation/git-rm.txt---dry-run"><span data-i18n="675ca48430023bf861e914e0cf5bbe183efe84bd9d831affc574394bf4edc690/c1" data-source="--dry-run" onmousemove="i18n(this)">--dry-run</span></dt> <dd> <p><span data-i18n="27c0b31c67f953ce47090065604d115a61586d17b3ce6686f5456b3ac30842cc/77" data-source="Don&amp;rsquo;t actually remove any file(s). Instead, just show if they exist in the index and would otherwise be removed by the command." onmousemove="i18n(this)">&Ncy;&acy; &scy;&acy;&mcy;&ocy;&mcy; &dcy;&iecy;&lcy;&iecy; &ncy;&iecy; &ucy;&dcy;&acy;&lcy;&yacy;&jcy;&tcy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;. &Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy; &pcy;&ocy;&kcy;&acy;&zhcy;&icy;&tcy;&iecy;, &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&yucy;&tcy; &lcy;&icy; &ocy;&ncy;&icy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy; &icy; &vcy; &pcy;&rcy;&ocy;&tcy;&icy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy; &ocy;&ncy;&icy; &bcy;&ycy;&lcy;&icy; &bcy;&ycy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ycy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ocy;&jcy;.</span></p> </dd> <dt id="Documentation/git-rm.txt--r"><span data-i18n="1e1caaf8cf28cb0243175a8dd26a3fc0d8f2c5527c661586bb816e57b9919be2/c9" data-source="-r" onmousemove="i18n(this)">-r</span></dt> <dd> <p><span data-i18n="c5214a22c8b0c419135e59736198b379c1214b46238bb0fcaf28acdf25e7b128/54" data-source="Allow recursive removal when a leading directory name is given." onmousemove="i18n(this)">&Rcy;&acy;&zcy;&rcy;&iecy;&shcy;&icy;&tcy;&softcy; &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&vcy;&ncy;&ocy;&iecy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy;, &iecy;&scy;&lcy;&icy; &ucy;&kcy;&acy;&zcy;&acy;&ncy;&ocy; &vcy;&iecy;&dcy;&ucy;&shchcy;&iecy;&iecy; &icy;&mcy;&yacy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;.</span></p> </dd> <dt id="Documentation/git-rm.txt---"><span data-i18n="d8156bae0c4243d3742fc4e9774d8aceabe0410249d720c855f98afc88ff846c/71" data-source="--" onmousemove="i18n(this)">--</span></dt> <dd> <p><span data-i18n="ba9fd00ff5b29039df6bd2bc9d7af497e496717081b0f32fc022da7e3f26f159/77" data-source="This option can be used to separate command-line options from the list of files, (useful when filenames might be mistaken for command-line options)." onmousemove="i18n(this)">&Ecy;&tcy;&ucy; &ocy;&pcy;&tscy;&icy;&yucy; &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &dcy;&lcy;&yacy; &ocy;&tcy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&yacy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&ocy;&vcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy; &ocy;&tcy; &scy;&pcy;&icy;&scy;&kcy;&acy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; (&pcy;&ocy;&lcy;&iecy;&zcy;&ncy;&ocy;, &kcy;&ocy;&gcy;&dcy;&acy; &icy;&mcy;&iecy;&ncy;&acy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &mcy;&ocy;&gcy;&ucy;&tcy; &bcy;&ycy;&tcy;&softcy; &ocy;&shcy;&icy;&bcy;&ocy;&chcy;&ncy;&ocy; &pcy;&rcy;&icy;&ncy;&yacy;&tcy;&ycy; &zcy;&acy; &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;&ycy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;).</span></p> </dd> <dt id="Documentation/git-rm.txt---cached"><span data-i18n="f604ffb1a6e88411905b4560d28e36c07a126b2b39e06cb7da585ccc5c4a356e/42" data-source="--cached" onmousemove="i18n(this)">--cached</span></dt> <dd> <p><span data-i18n="2f504939976d3dd2384537e5812d0b7994f399d47a8b88f5297f3478c38ccf9e/1d" data-source="Use this option to unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone." onmousemove="i18n(this)">&Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy; &ecy;&tcy;&ucy; &ocy;&pcy;&tscy;&icy;&yucy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ocy;&tcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&softcy; &icy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &pcy;&ucy;&tcy;&icy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;. &Fcy;&acy;&jcy;&lcy;&ycy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy; &ocy;&tcy; &tcy;&ocy;&gcy;&ocy;, &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&ycy; &ocy;&ncy;&icy; &icy;&lcy;&icy; &ncy;&iecy;&tcy;, &ocy;&scy;&tcy;&acy;&ncy;&ucy;&tcy;&scy;&yacy; &vcy; &pcy;&ocy;&kcy;&ocy;&iecy;.</span></p> </dd> <dt id="Documentation/git-rm.txt---ignore-unmatch"><span data-i18n="b4f48361e98217330e0a6d99fb8f1b069a1f309d48cac69ae739c9d8e374ea64/a0" data-source="--ignore-unmatch" onmousemove="i18n(this)">--ignore-unmatch</span></dt> <dd> <p><span data-i18n="3cd6ae69457dddb3640aec1f876580f7640d01c31718fcb42c3c7bc6f7361fdd/ce" data-source="Exit with a zero status even if no files matched." onmousemove="i18n(this)">&Vcy;&ycy;&jcy;&tcy;&icy; &scy; &ncy;&ucy;&lcy;&iecy;&vcy;&ycy;&mcy; &scy;&tcy;&acy;&tcy;&ucy;&scy;&ocy;&mcy;, &dcy;&acy;&zhcy;&iecy; &iecy;&scy;&lcy;&icy; &ncy;&icy; &ocy;&dcy;&icy;&ncy; &fcy;&acy;&jcy;&lcy; &ncy;&iecy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;.</span></p> </dd> <dt id="Documentation/git-rm.txt---sparse"><span data-i18n="772e33e8b03937db3998ff9e8cd7b8114d1c7f3398436b3f057422d62afb165a/f4" data-source="--sparse" onmousemove="i18n(this)">--sparse</span></dt> <dd> <p><span data-i18n="76a8a743278d54b543d20f4e0649ccc5776fc305a0da41580f52cb08e51b93fc/70" data-source="Allow updating index entries outside of the sparse-checkout cone. Normally, &lt;code&gt;git rm&lt;/code&gt; refuses to update index entries whose paths do not fit within the sparse-checkout cone. See &lt;a href=&quot;git-sparse-checkout&quot;&gt;git-sparse-checkout[1]&lt;/a&gt; for more." onmousemove="i18n(this)">&Rcy;&acy;&zcy;&rcy;&iecy;&shcy;&icy;&tcy;&softcy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&iecy;&jcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &zcy;&acy; &pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&acy;&mcy;&icy; &kcy;&ocy;&ncy;&ucy;&scy;&acy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ocy;&jcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&icy;. &Ocy;&bcy;&ycy;&chcy;&ncy;&ocy;  <code>git rm</code>  &ocy;&tcy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&yacy;&tcy;&softcy; &zcy;&acy;&pcy;&icy;&scy;&icy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy;, &pcy;&ucy;&tcy;&icy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy; &ncy;&iecy; &ucy;&kcy;&lcy;&acy;&dcy;&ycy;&vcy;&acy;&yucy;&tcy;&scy;&yacy; &vcy; &kcy;&ocy;&ncy;&ucy;&scy; &rcy;&acy;&zcy;&rcy;&iecy;&zhcy;&iecy;&ncy;&ncy;&ocy;&jcy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&kcy;&icy;. &Dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ucy;&yucy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yucy; &scy;&mcy;. &vcy;  <a href="git-sparse-checkout.html">git-sparse-checkout[1]</a> .</span></p> </dd> <dt id="Documentation/git-rm.txt--q"><span data-i18n="5ce681666a15a41274346f65b8bcbf56f8e8170ac00706a44a09ee4d786a8609/cd" data-source="-q" onmousemove="i18n(this)">-q</span></dt> <dt id="Documentation/git-rm.txt---quiet"><span data-i18n="b00818cdc507640687732769ee1cb501db377927ee76d03df23978bd0d706888/e2" data-source="--quiet" onmousemove="i18n(this)">--quiet</span></dt> <dd> <p><span data-i18n="e6e0fc3dcfe383f7d6db7f6412793abe9dc4ec3413e580be4bdc25127903c9fb/4c" data-source="&lt;code&gt;git rm&lt;/code&gt; normally outputs one line (in the form of an &lt;code&gt;rm&lt;/code&gt; command) for each file removed. This option suppresses that output." onmousemove="i18n(this)"><code>git rm</code>  &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &vcy;&ycy;&vcy;&ocy;&dcy;&icy;&tcy; &ocy;&dcy;&ncy;&ucy; &scy;&tcy;&rcy;&ocy;&kcy;&ucy; (&vcy; &vcy;&icy;&dcy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>rm</code> ) &dcy;&lcy;&yacy; &kcy;&acy;&zhcy;&dcy;&ocy;&gcy;&ocy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&acy;. &Ecy;&tcy;&acy; &ocy;&pcy;&tscy;&icy;&yacy; &pcy;&ocy;&dcy;&acy;&vcy;&lcy;&yacy;&iecy;&tcy; &ecy;&tcy;&ocy;&tcy; &vcy;&ycy;&vcy;&ocy;&dcy;.</span></p> </dd> <dt id="Documentation/git-rm.txt---pathspec-from-fileltfilegt"><span data-i18n="da8857eb3d44efb4cdb38781f7cc2d2dd9074dc3c2a6ca51bd424135fedabfd0/18" data-source="--pathspec-from-file=&amp;lt;file&amp;gt;" onmousemove="i18n(this)">--pathspec-from-file=&lt;file&gt;</span></dt> <dd> <p><span data-i18n="edbea5c504ccb9748dfc5d09bca08d1600446d3e324d8503642ae08801e92fce/7b" data-source="Pathspec is passed in &lt;code&gt;&amp;lt;file&amp;gt;&lt;/code&gt; instead of commandline args. If &lt;code&gt;&amp;lt;file&amp;gt;&lt;/code&gt; is exactly &lt;code&gt;-&lt;/code&gt; then standard input is used. Pathspec elements are separated by LF or CR/LF. Pathspec elements can be quoted as explained for the configuration variable &lt;code&gt;core.quotePath&lt;/code&gt; (see &lt;a href=&quot;git-config&quot;&gt;git-config[1]&lt;/a&gt;). See also &lt;code&gt;--pathspec-file-nul&lt;/code&gt; and global &lt;code&gt;--literal-pathspecs&lt;/code&gt;." onmousemove="i18n(this)">&Scy;&pcy;&iecy;&tscy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&yacy; &pcy;&ucy;&tcy;&icy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy;  <code>&lt;file&gt;</code>  &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &acy;&rcy;&gcy;&ucy;&mcy;&iecy;&ncy;&tcy;&ocy;&vcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy;. &IEcy;&scy;&lcy;&icy;  <code>&lt;file&gt;</code>  &mdash; &ecy;&tcy;&ocy; &tcy;&ocy;&chcy;&ncy;&ocy;  <code>-</code> , &tcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy;&scy;&yacy; &scy;&tcy;&acy;&ncy;&dcy;&acy;&rcy;&tcy;&ncy;&ycy;&jcy; &vcy;&vcy;&ocy;&dcy;. &Ecy;&lcy;&iecy;&mcy;&iecy;&ncy;&tcy;&ycy; Pathspec &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; LF &icy;&lcy;&icy; CR/LF. &Ecy;&lcy;&iecy;&mcy;&iecy;&ncy;&tcy;&ycy; Pathspec &mcy;&ocy;&zhcy;&ncy;&ocy; &zcy;&acy;&kcy;&lcy;&yucy;&chcy;&acy;&tcy;&softcy; &vcy; &kcy;&acy;&vcy;&ycy;&chcy;&kcy;&icy;, &kcy;&acy;&kcy; &ocy;&pcy;&icy;&scy;&acy;&ncy;&ocy; &dcy;&lcy;&yacy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&ncy;&ncy;&ocy;&jcy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy;  <code>core.quotePath</code>  (&scy;&mcy;.  <a href="git-config.html">git-config[1]</a> ). &Scy;&mcy;. &tcy;&acy;&kcy;&zhcy;&iecy;  <code>--pathspec-file-nul</code>  &icy; &gcy;&lcy;&ocy;&bcy;&acy;&lcy;&softcy;&ncy;&ycy;&jcy;  <code>--literal-pathspecs</code> .</span></p> </dd> <dt id="Documentation/git-rm.txt---pathspec-file-nul"><span data-i18n="425e5942f80034f1f089327693cf66158c953fde8f89bae24b0fbc651b9af0e9/1a" data-source="--pathspec-file-nul" onmousemove="i18n(this)">--pathspec-file-nul</span></dt> <dd> <p><span data-i18n="7e27df84b5773075cf108a34f1dc37f2f6a47f96c09842b70ed9d300ad32e7c1/c3" data-source="Only meaningful with &lt;code&gt;--pathspec-from-file&lt;/code&gt;. Pathspec elements are separated with NUL character and all other characters are taken literally (including newlines and quotes)." onmousemove="i18n(this)">&Icy;&mcy;&iecy;&iecy;&tcy; &scy;&mcy;&ycy;&scy;&lcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy;  <code>--pathspec-from-file</code> . &Ecy;&lcy;&iecy;&mcy;&iecy;&ncy;&tcy;&ycy; Pathspec &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&ocy;&mcy; NUL, &acy; &vcy;&scy;&iecy; &ocy;&scy;&tcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&ycy; &vcy;&ocy;&scy;&pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&yucy;&tcy;&scy;&yacy; &bcy;&ucy;&kcy;&vcy;&acy;&lcy;&softcy;&ncy;&ocy; (&vcy;&kcy;&lcy;&yucy;&chcy;&acy;&yacy; &scy;&icy;&mcy;&vcy;&ocy;&lcy;&ycy; &ncy;&ocy;&vcy;&ocy;&jcy; &scy;&tcy;&rcy;&ocy;&kcy;&icy; &icy; &kcy;&acy;&vcy;&ycy;&chcy;&kcy;&icy;).</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_removing_files_that_have_disappeared_from_the_filesystem"><span data-i18n="10a45289226034d4456548415712f1814d72df465380a17ca4afb234ba213abd/9e" data-source="Removing files that have disappeared from the filesystem" onmousemove="i18n(this)">&Ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &icy;&scy;&chcy;&iecy;&zcy;&lcy;&icy; &icy;&zcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;&ocy;&jcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&ycy;</span></h2> <div> <p><span data-i18n="2688be2b203adf0f0c12346b3b0f20be6fda8fa1e3a1f6e008ff2c5b861d76c9/b9" data-source="There is no option for &lt;code&gt;git rm&lt;/code&gt; to remove from the index only the paths that have disappeared from the filesystem. However, depending on the use case, there are several ways that can be done." onmousemove="i18n(this)">&Ucy;  <code>git rm</code>  &ncy;&iecy;&tcy; &vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;&scy;&tcy;&icy; &ucy;&dcy;&acy;&lcy;&yacy;&tcy;&softcy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &tcy;&iecy; &pcy;&ucy;&tcy;&icy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &icy;&scy;&chcy;&iecy;&zcy;&lcy;&icy; &icy;&zcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;&ocy;&jcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&ycy;. &Ocy;&dcy;&ncy;&acy;&kcy;&ocy; &vcy; &zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy;&scy;&tcy;&icy; &ocy;&tcy; &vcy;&acy;&rcy;&icy;&acy;&ncy;&tcy;&acy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&yacy; &mcy;&ocy;&zhcy;&ncy;&ocy; &scy;&dcy;&iecy;&lcy;&acy;&tcy;&softcy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy;&pcy;&ocy;&scy;&ocy;&bcy;&ocy;&vcy;.</span></p> <div> <h3 class="text-body-emphasis"  id="_using_git_commit_a"><span data-i18n="97c64081ea2ff0c85fb02a9b1f958c3f88342b658afe377d4f2526dc463ef5fb/24" data-source="Using &amp;ldquo;git commit -a&amp;rdquo;" onmousemove="i18n(this)">&Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy; &laquo;git commit -a&raquo;</span></h3> <p><span data-i18n="cf09b2c4a35733651fbad9b9183b0617e6d557a2896264faeb63bf2d45824e76/ff" data-source="If you intend that your next commit should record all modifications of tracked files in the working tree and record all removals of files that have been removed from the working tree with &lt;code&gt;rm&lt;/code&gt; (as opposed to &lt;code&gt;git rm&lt;/code&gt;), use &lt;code&gt;git commit -a&lt;/code&gt;, as it will automatically notice and record all removals. You can also have a similar effect without committing by using &lt;code&gt;git add -u&lt;/code&gt;." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&acy;&gcy;&acy;&iecy;&tcy;&iecy;, &chcy;&tcy;&ocy; &vcy;&acy;&shcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&jcy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy; &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&tcy;&softcy; &vcy;&scy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&mcy;&ycy;&khcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &icy; &zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&tcy;&softcy; &vcy;&scy;&iecy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &bcy;&ycy;&lcy;&icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ycy; &icy;&zcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>rm</code>  (&vcy; &ocy;&tcy;&lcy;&icy;&chcy;&icy;&iecy; &ocy;&tcy;  <code>git rm</code> ), &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <code>git commit -a</code> , &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ocy;&ncy; &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &zcy;&acy;&mcy;&iecy;&tcy;&icy;&tcy; &icy; &zcy;&acy;&pcy;&icy;&scy;&ycy;&vcy;&acy;&tcy;&softcy; &vcy;&scy;&iecy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy;. &Vcy;&ycy; &tcy;&acy;&kcy;&zhcy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &acy;&ncy;&acy;&lcy;&ocy;&gcy;&icy;&chcy;&ncy;&ycy;&jcy; &ecy;&fcy;&fcy;&iecy;&kcy;&tcy; &bcy;&iecy;&zcy; &kcy;&acy;&kcy;&icy;&khcy;-&lcy;&icy;&bcy;&ocy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ocy;&vcy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yacy;  <code>git add -u</code> .</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_using_git_add_a"><span data-i18n="c8894d80c023405bcd03cde7ce7005fda49a4b4bab011095772d299d9c477b82/b8" data-source="Using &amp;ldquo;git add -A&amp;rdquo;" onmousemove="i18n(this)">&Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy; &laquo;git add -A&raquo;</span></h3> <p><span data-i18n="ce0fa47368f319e0724f970e58e60013dac1239d474a6b57380065ee0a7065cc/22" data-source="When accepting a new code drop for a vendor branch, you probably want to record both the removal of paths and additions of new paths as well as modifications of existing paths." onmousemove="i18n(this)">&Pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&yacy; &ncy;&ocy;&vcy;&ycy;&jcy; &vcy;&ycy;&pcy;&ucy;&scy;&kcy; &kcy;&ocy;&dcy;&acy; &dcy;&lcy;&yacy; &vcy;&iecy;&tcy;&kcy;&icy; &pcy;&ocy;&scy;&tcy;&acy;&vcy;&shchcy;&icy;&kcy;&acy;, &vcy;&ycy;, &vcy;&iecy;&rcy;&ocy;&yacy;&tcy;&ncy;&ocy;, &zcy;&acy;&khcy;&ocy;&tcy;&icy;&tcy;&iecy; &zcy;&acy;&pcy;&icy;&scy;&acy;&tcy;&softcy; &kcy;&acy;&kcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &pcy;&ucy;&tcy;&iecy;&jcy; &icy; &dcy;&ocy;&bcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &ncy;&ocy;&vcy;&ycy;&khcy; &pcy;&ucy;&tcy;&iecy;&jcy;, &tcy;&acy;&kcy; &icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&khcy; &pcy;&ucy;&tcy;&iecy;&jcy;.</span></p> <p><span data-i18n="6fc723ef266e11d1128c8111024b1ccbf17e40050e103bfb165fe0cb1e01f480/57" data-source="Typically you would first remove all tracked files from the working tree using this command:" onmousemove="i18n(this)">&Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &vcy;&ycy; &scy;&ncy;&acy;&chcy;&acy;&lcy;&acy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy;&iecy; &vcy;&scy;&iecy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&mcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &icy;&zcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy; &ecy;&tcy;&ocy;&jcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;:</span></p> <div> <div> <pre class="hljs language-bash">git ls-files -z | xargs -0 <span class="hljs-built_in">rm</span> -f</pre> </div> </div> <p><span data-i18n="a65f0841e1f3a11797e9c936378e15a1ba5a2ae1f19f7dbe08aa47b939c3d23b/b7" data-source="and then untar the new code in the working tree. Alternately you could &lt;code&gt;rsync&lt;/code&gt; the changes into the working tree." onmousemove="i18n(this)">&acy; &zcy;&acy;&tcy;&iecy;&mcy; &rcy;&acy;&scy;&pcy;&acy;&kcy;&ucy;&jcy;&tcy;&iecy; &ncy;&ocy;&vcy;&ycy;&jcy; &kcy;&ocy;&dcy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;. &Acy;&lcy;&softcy;&tcy;&iecy;&rcy;&ncy;&acy;&tcy;&icy;&vcy;&ncy;&ocy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy;  <code>rsync</code>  &vcy;&ncy;&iecy;&scy;&tcy;&icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;.</span></p> <p><span data-i18n="36e4c2ea9dd51677fc39e0b4a809a43f48eba414381a4c5b3a83371ac26d7a81/d7" data-source="After that, the easiest way to record all removals, additions, and modifications in the working tree is:" onmousemove="i18n(this)">&Pcy;&ocy;&scy;&lcy;&iecy; &ecy;&tcy;&ocy;&gcy;&ocy; &scy;&acy;&mcy;&ycy;&jcy; &pcy;&rcy;&ocy;&scy;&tcy;&ocy;&jcy; &scy;&pcy;&ocy;&scy;&ocy;&bcy; &zcy;&acy;&fcy;&icy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy; &vcy;&scy;&iecy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy;, &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&icy;&yacy; &icy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;:</span></p> <div> <div> <pre class="hljs language-csharp">git <span class="hljs-keyword">add</span> -A</pre> </div> </div> <p><span data-i18n="aa1378939b12821e4ef80be35c624ac71b164e3d406aaa11fb2f9e89537b8aad/cf" data-source="See &lt;a href=&quot;git-add&quot;&gt;git-add[1]&lt;/a&gt;." onmousemove="i18n(this)">See <a href="git-add.html">git-add[1]</a>.</span></p> </div> <div> <h3 class="text-body-emphasis"  id="_other_ways"><span data-i18n="507b1b2110094ed30e95808d09d02bc5ae7431933fd87c6d8e841d0829b595d0/8e" data-source="Other ways" onmousemove="i18n(this)">Other ways</span></h3> <p><span data-i18n="0614fdd4dfb27ad394e5bb8273b208116a3dced96bbb65d3c0564720b482c19b/01" data-source="If all you really want to do is to remove from the index the files that are no longer present in the working tree (perhaps because your working tree is dirty so that you cannot use &lt;code&gt;git commit -a&lt;/code&gt;), use the following command:" onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&scy;&iecy;, &chcy;&tcy;&ocy; &vcy;&acy;&mcy; &dcy;&iecy;&jcy;&scy;&tcy;&vcy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ocy; &ncy;&ucy;&zhcy;&ncy;&ocy;, &mdash; &ecy;&tcy;&ocy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &fcy;&acy;&jcy;&lcy;&ycy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&khcy; &bcy;&ocy;&lcy;&softcy;&shcy;&iecy; &ncy;&iecy;&tcy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; (&vcy;&ocy;&zcy;&mcy;&ocy;&zhcy;&ncy;&ocy;, &pcy;&ocy;&tcy;&ocy;&mcy;&ucy;, &chcy;&tcy;&ocy; &vcy;&acy;&shcy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &zcy;&acy;&gcy;&rcy;&yacy;&zcy;&ncy;&iecy;&ncy;&ocy; &icy; &vcy;&ycy; &ncy;&iecy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy;  <code>git commit -a</code> ), &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ucy;:</span></p> <div> <div> <pre class="hljs language-bash">git diff --name-only --diff-filter=D -z | xargs -0 git <span class="hljs-built_in">rm</span> --cached</pre> </div> </div> </div> </div> <h2 class="text-body-emphasis"  id="_submodules"><span data-i18n="164d7e819605edf514e288a42414763d89425de061681e362909e064c857d7ea/21" data-source="Submodules" onmousemove="i18n(this)">Submodules</span></h2> <div> <p><span data-i18n="08a69e56b7566165e4750ef9545764a8293f427f13f12105478a3ab72f902235/b4" data-source="Only submodules using a gitfile (which means they were cloned with a Git version 1.7.8 or newer) will be removed from the work tree, as their repository lives inside the .git directory of the superproject. If a submodule (or one of those nested inside it) still uses a .git directory, &lt;code&gt;git rm&lt;/code&gt; will move the submodules git directory into the superprojects git directory to protect the submodule&amp;rsquo;s history. If it exists the submodule.&amp;lt;name&amp;gt; section in the &lt;a href=&quot;gitmodules&quot;&gt;gitmodules[5]&lt;/a&gt; file will also be removed and that file will be staged (unless --cached or -n are used)." onmousemove="i18n(this)">&Tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy;, &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&shchcy;&icy;&iecy; &fcy;&acy;&jcy;&lcy;  git  (&chcy;&tcy;&ocy; &ocy;&zcy;&ncy;&acy;&chcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &ocy;&ncy;&icy; &bcy;&ycy;&lcy;&icy; &kcy;&lcy;&ocy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ycy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  Git  &vcy;&iecy;&rcy;&scy;&icy;&icy; 1.7.8 &icy;&lcy;&icy; &ncy;&ocy;&vcy;&iecy;&iecy;), &bcy;&ucy;&dcy;&ucy;&tcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ycy; &icy;&zcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &icy;&khcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&scy;&yacy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &fcy;&acy;&jcy;&lcy;&acy; .  git  &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;. &IEcy;&scy;&lcy;&icy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; (&icy;&lcy;&icy; &ocy;&dcy;&icy;&ncy; &icy;&zcy; &vcy;&lcy;&ocy;&zhcy;&iecy;&ncy;&ncy;&ycy;&khcy; &vcy; &ncy;&iecy;&gcy;&ocy;) &pcy;&ocy;-&pcy;&rcy;&iecy;&zhcy;&ncy;&iecy;&mcy;&ucy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &fcy;&acy;&jcy;&lcy; .  git ,  <code>git rm</code>  &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&scy;&tcy;&icy;&tcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy;  git  &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&ocy;&vcy;  git , &chcy;&tcy;&ocy;&bcy;&ycy; &zcy;&acy;&shchcy;&icy;&tcy;&icy;&tcy;&softcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yucy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;. &IEcy;&scy;&lcy;&icy; &ocy;&ncy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;, &rcy;&acy;&zcy;&dcy;&iecy;&lcy; submodule.&lt;name&gt; &vcy; &fcy;&acy;&jcy;&lcy;&iecy;  <a href="gitmodules.html">gitmodules[5]</a>  &tcy;&acy;&kcy;&zhcy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;, &icy; &ecy;&tcy;&ocy;&tcy; &fcy;&acy;&jcy;&lcy; &bcy;&ucy;&dcy;&iecy;&tcy; &pcy;&rcy;&ocy;&icy;&ncy;&dcy;&iecy;&kcy;&scy;&icy;&rcy;&ocy;&vcy;&acy;&ncy; (&iecy;&scy;&lcy;&icy; &ncy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&yucy;&tcy;&scy;&yacy; --cached &icy;&lcy;&icy; -n).</span></p> <p><span data-i18n="dbd890798a2fb33c35f8444c68b8d38819e7156889b55afbfcbcfcab3b3287da/ab" data-source="A submodule is considered up to date when the HEAD is the same as recorded in the index, no tracked files are modified and no untracked files that aren&amp;rsquo;t ignored are present in the submodule&amp;rsquo;s work tree. Ignored files are deemed expendable and won&amp;rsquo;t stop a submodule&amp;rsquo;s work tree from being removed." onmousemove="i18n(this)">&Scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &scy;&chcy;&icy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ncy;&ycy;&mcy;, &iecy;&scy;&lcy;&icy; HEAD &scy;&ocy;&vcy;&pcy;&acy;&dcy;&acy;&iecy;&tcy; &scy; &zcy;&acy;&pcy;&icy;&scy;&acy;&ncy;&ncy;&ycy;&mcy; &vcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&iecy;, &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&mcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &ncy;&iecy; &icy;&zcy;&mcy;&iecy;&ncy;&yacy;&yucy;&tcy;&scy;&yacy; &icy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &ocy;&tcy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&tcy; &ncy;&iecy;&ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&mcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &ncy;&iecy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ucy;&yucy;&tcy;&scy;&yacy;. &Icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ucy;&iecy;&mcy;&ycy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy; &scy;&chcy;&icy;&tcy;&acy;&yucy;&tcy;&scy;&yacy; &rcy;&acy;&scy;&khcy;&ocy;&dcy;&ucy;&iecy;&mcy;&ycy;&mcy;&icy; &icy; &ncy;&iecy; &pcy;&rcy;&iecy;&dcy;&ocy;&tcy;&vcy;&rcy;&acy;&shchcy;&acy;&yucy;&tcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;.</span></p> <p> <span data-i18n="0ed3b04b247f6dd67fc6c25c9abff82d13453864598b1cfea8f7fe01914fb2ed/68" data-source="If you only want to remove the local checkout of a submodule from your work tree without committing the removal, use &lt;a href=&quot;git-submodule&quot;&gt;git-submodule[1]&lt;/a&gt;&lt;code&gt;deinit&lt;/code&gt; instead. Also see &lt;a href=&quot;gitsubmodules&quot;&gt;gitsubmodules[7]&lt;/a&gt; for details on submodule removal." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &vcy;&ycy; &khcy;&ocy;&tcy;&icy;&tcy;&iecy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;&iecy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &icy;&zcy; &vcy;&acy;&shcy;&iecy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;, &ncy;&iecy; &fcy;&icy;&kcy;&scy;&icy;&rcy;&ucy;&yacy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy;, &vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&jcy;&tcy;&iecy;  <a href="git-submodule.html">git-submodule[1]</a> <code>deinit</code> . &Tcy;&acy;&kcy;&zhcy;&iecy; &scy;&mcy;.  <a href="gitsubmodules.html">gitsubmodules[7]</a>  &dcy;&lcy;&yacy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy;&dcy;&rcy;&ocy;&bcy;&ncy;&ocy;&jcy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&icy; &ocy;&bcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&icy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_examples"><span data-i18n="e68ee04dff59551b7d1ae07a2f8a00dc61d841628948da3d2781630706a05e92/38" data-source="Examples" onmousemove="i18n(this)">Examples</span></h2> <div> <div> <dl> <dt id="Documentation/git-rm.txt-codegitrmDocumentationtxtcode"> <code>git rm Documentation/\*.txt</code> </dt> <dd> <p><span data-i18n="999ddf7a84e03cdb4bc7647ade5e517267fe9057e238844e0877b4d74e38fc50/9f" data-source="Removes all &lt;code&gt;*.txt&lt;/code&gt; files from the index that are under the &lt;code&gt;Documentation&lt;/code&gt; directory and any of its subdirectories." onmousemove="i18n(this)">&Ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy; &icy;&zcy; &icy;&ncy;&dcy;&iecy;&kcy;&scy;&acy; &vcy;&scy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;  <code>*.txt</code> , &ncy;&acy;&khcy;&ocy;&dcy;&yacy;&shchcy;&icy;&iecy;&scy;&yacy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>Documentation</code>  &icy; &lcy;&yucy;&bcy;&ocy;&mcy; &icy;&zcy; &iecy;&gcy;&ocy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&ocy;&vcy;.</span></p> <p><span data-i18n="2ea46e31fe350a9791b4e571ca5d82927fa6cb3bff30b6c80d391b245a501596/3d" data-source="Note that the asterisk &lt;code&gt;*&lt;/code&gt; is quoted from the shell in this example; this lets Git, and not the shell, expand the pathnames of files and subdirectories under the &lt;code&gt;Documentation/&lt;/code&gt; directory." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; &vcy; &ecy;&tcy;&ocy;&mcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&iecy; &zcy;&vcy;&iecy;&zcy;&dcy;&ocy;&chcy;&kcy;&acy;  <code>*</code>  &tscy;&icy;&tcy;&icy;&rcy;&ucy;&iecy;&tcy;&scy;&yacy; &icy;&zcy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&icy;; &ecy;&tcy;&ocy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; Git, &acy; &ncy;&iecy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&iecy;, &rcy;&acy;&scy;&shcy;&icy;&rcy;&yacy;&tcy;&softcy; &pcy;&ucy;&tcy;&icy; &kcy; &fcy;&acy;&jcy;&lcy;&acy;&mcy; &icy; &pcy;&ocy;&dcy;&kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;&mcy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>Documentation/</code> .</span></p> </dd> <dt id="Documentation/git-rm.txt-codegitrm-fgit-shcode"> <code>git rm -f git-*.sh</code> </dt> <dd> <p><span data-i18n="e020ed1db832df304c5626b340db5250f8a16d0f57be245ba90c2bc7879a6634/1b" data-source="Because this example lets the shell expand the asterisk (i.e. you are listing the files explicitly), it does not remove &lt;code&gt;subdir/git-foo.sh&lt;/code&gt;." onmousemove="i18n(this)">&Pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &ecy;&tcy;&ocy;&tcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &ocy;&bcy;&ocy;&lcy;&ocy;&chcy;&kcy;&iecy; &rcy;&acy;&scy;&shcy;&icy;&rcy;&icy;&tcy;&softcy; &zcy;&vcy;&iecy;&zcy;&dcy;&ocy;&chcy;&kcy;&ucy; (&tcy;. &iecy;. &vcy;&ycy; &yacy;&vcy;&ncy;&ocy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&iecy; &fcy;&acy;&jcy;&lcy;&ycy;), &ocy;&ncy; &ncy;&iecy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy;  <code>subdir/git-foo.sh</code>  .</span></p> </dd> </dl> </div> </div> <h2 class="text-body-emphasis"  id="_bugs"><span data-i18n="ff7c5467ce496637e5ba10662b7a90cde4ed9f8ef33f06fab0893b1c6c800845/88" data-source="Bugs" onmousemove="i18n(this)">Bugs</span></h2> <div> <p><span data-i18n="d9a317ee550833ffcde9b8b94de70bbf4b81c8873a23776f248734385aa26bcd/76" data-source="Each time a superproject update removes a populated submodule (e.g. when switching between commits before and after the removal) a stale submodule checkout will remain in the old location. Removing the old directory is only safe when it uses a gitfile, as otherwise the history of the submodule will be deleted too. This step will be obsolete when recursive submodule update has been implemented." onmousemove="i18n(this)">&Kcy;&acy;&zhcy;&dcy;&ycy;&jcy; &rcy;&acy;&zcy;, &kcy;&ocy;&gcy;&dcy;&acy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy; &zcy;&acy;&pcy;&ocy;&lcy;&ncy;&iecy;&ncy;&ncy;&ycy;&jcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; (&ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &pcy;&rcy;&icy; &pcy;&iecy;&rcy;&iecy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy;&icy;&icy; &mcy;&iecy;&zhcy;&dcy;&ucy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&yacy;&mcy;&icy; &dcy;&ocy; &icy; &pcy;&ocy;&scy;&lcy;&iecy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&yacy;), &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&iecy; &ucy;&scy;&tcy;&acy;&rcy;&iecy;&vcy;&shcy;&iecy;&gcy;&ocy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &ocy;&scy;&tcy;&acy;&ncy;&iecy;&tcy;&scy;&yacy; &vcy; &scy;&tcy;&acy;&rcy;&ocy;&mcy; &mcy;&iecy;&scy;&tcy;&iecy;. &Ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&iecy; &scy;&tcy;&acy;&rcy;&ocy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; &bcy;&iecy;&zcy;&ocy;&pcy;&acy;&scy;&ncy;&ocy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy; &tcy;&ocy;&mcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;, &iecy;&scy;&lcy;&icy; &ocy;&ncy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; git-&fcy;&acy;&jcy;&lcy;, &icy;&ncy;&acy;&chcy;&iecy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yacy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &tcy;&acy;&kcy;&zhcy;&iecy; &bcy;&ucy;&dcy;&iecy;&tcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&acy;. &Ecy;&tcy;&ocy;&tcy; &shcy;&acy;&gcy; &scy;&tcy;&acy;&ncy;&iecy;&tcy; &ucy;&scy;&tcy;&acy;&rcy;&iecy;&vcy;&shcy;&icy;&mcy;, &kcy;&ocy;&gcy;&dcy;&acy; &bcy;&ucy;&dcy;&iecy;&tcy; &rcy;&iecy;&acy;&lcy;&icy;&zcy;&ocy;&vcy;&acy;&ncy;&ocy; &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&vcy;&ncy;&ocy;&iecy; &ocy;&bcy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&icy;&iecy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;.</span></p> </div> <h2 class="text-body-emphasis"  id="_see_also"><span data-i18n="2fa97693b70fa87b95b2d1bdf9558e4ac65d5e82d145f13a03849c4d9c4957a9/40" data-source="See also" onmousemove="i18n(this)">See also</span></h2> <div> <p><a href="git-add.html"><span data-i18n="9309c98daf8e31bed13ffc8b0907162c36da3a67da08030e0744e38f2e1eadf2/4e" data-source="git-add[1]" onmousemove="i18n(this)">git-add[1]</span></a></p> </div><address>
<p>
    &copy; 2012&ndash;2024 Scott Chacon and others<br/>Licensed under the MIT License.<br/>
<a href="https://git-scm.com/docs/git-rm">https://git-scm.com/docs/git-rm</a>
</p>
</address>                </article>
            </main>

            <br>
            <br>
            <hr>

                            <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6424571640879890"
     data-ad-slot="3954319254"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>            
        </div>

        <!-- -->

        <div class="col-md-3">
            <br>
            <form action="-index-.html">
                <div class="input-group">
                    <input class="form-control" type="search" name="q" placeholder="Search for Git" required>
                    <button class="btn btn-primary" type="submit">
                        <i class="bi bi-search"></i>
                    </button>
                </div>
            </form>
            <br>

                            <div class="list-group list-group-flush">
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-send-email.html">
                            git send-email                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-send-pack.html">
                            git send-pack                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-sh-i18n.html">
                            git sh-i18n                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-sh-i18n--envsubst.html">
                            git sh-i18n--envsubst                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-sh-setup.html">
                            git sh-setup                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-shell.html">
                            git shell                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="git-shortlog.html">
                            git shortlog                        </a>
                                    </div>
            
            <br>
            <div class="my-3">
                   <ins class="adsbygoogle"
        style="display:block"
        data-ad-format="autorelaxed"
        data-ad-client="ca-pub-6424571640879890"
        data-ad-slot="7867651344"></ins>
   <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
   </script>            </div>
            <br>

            
            
        </div>
    </div>
</div>    <!--/sse-->

    <footer>
        <br>
        <div class="container">
            <div class="row">
                <div class="col">
                    <hr>
                    <div class="row">
                        <div class="col-md-10">
                            <ul class="nav">
                                <li class="nav-item">
                                    <a class="nav-link ps-0" href="https://runebook.dev/">Help us Improve Translation</a>
                                </li>
                                                            </ul>
                        </div>
                        <div class="col-md-2 text-end">
                            <a href="git-rm.html#" class="fs-5" aria-label="Top">
                                <i class="bi bi-arrow-up-square-fill"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
    </footer>
    <script src="../../../runebook.js"></script>
</body>

</html>